<section id="header">
	<div class="container">
		<div class="rows">
			<div class="col-md-9 col-sm-12">
				<div class="box-title-page">
					<h4>Products</h4>
				</div><br />
				<div class="row">
					<?php if(isset($items) && !empty($items)): foreach ($items as $item): ?>
					<div class="col-md-4 col-sm-12" style='margin-bottom:10px !important;'>
						<div class="box-product">
							<div class='image-product'>
								<?php if(empty($item->p_filename)) { ?>
								<img class="img-responsive" width='138' height='89' src="<?php echo img_theme('logo.png'); ?>" alt="Logo">
								<?php } else { ?>
								<img class="img-responsive" src="<?php echo site_url('products/appimage/products/thumbnail/'.$item->p_filename); ?>" alt="<?php echo $item->p_fileorig; ?>">
								<?php } ?>	
							</div>			
							<!-- End -->
							<div class="caption">
								<a href="<?php echo site_url('products/detail/'.slugify($item->p_name).'/'.$item->p_id); ?>"><h2 style='margin-bottom:1px !important;color:#b9b9b9;'><?php echo $item->p_name; ?></h2></a>
								<!-- <h4 style='color:#e60000;margin-top:0px !important'><?php echo date("d F, Y", strtotime($item->p_created_date)); ?></h4> -->
							</div>
						</div>
					</div>
					<?php endforeach; endif; ?>
				</div>
				<div class="text-center">
					<ul class="pagination">
						<?php echo $pagination; ?>
					</ul>
				</div>
			</div>
			<div class="col-md-3 col-sm-12">
				<div class="list-group">
				        <a href="#" class="list-group-item active">
				            <i class="fa fa-gift"></i> Categories Product
				        </a>
				        <?php if(isset($categories)): foreach ($categories as $cat): ?>
							<a href="<?php echo site_url('products/categories/'.$cat->cp_id.'/'.$cat->cp_name); ?>" class="list-group-item">
								<i class="fa fa-gift"></i> <?php echo $cat->cp_name; ?>
							</a>	
						<?php endforeach; endif; ?>
				</div>
				<div class="bs-example">
				    <div class="list-group">
				        <a href="#" class="list-group-item active">
				            <span class="glyphicon glyphicon-file"></span> Recent Article
				        </a>
				        <?php if(isset($recent_articles)): foreach ($recent_articles as $articles): ?>
							<a href="<?php echo site_url('articles/detail/'.slugify($articles->a_title).'/'.$articles->a_id); ?>" class="list-group-item">
								<i class="fa fa-gift"></i> <?php echo $articles->a_title; ?>
							</a>	
						<?php endforeach; endif; ?>
				    </div>
				</div>
				<div class="bs-example">
				    <div class="list-group">
				        <a href="#" class="list-group-item active">
				            <span class="glyphicon glyphicon-file"></span> Recent Recipes
				        </a>
				        <?php if(isset($recent_recipes)): foreach ($recent_recipes as $recipes): ?>
							<a href="<?php echo site_url('recipes/detail/'.slugify($recipes->r_name).'/'.$recipes->r_id); ?>" class="list-group-item">
								<i class="fa fa-gift"></i> <?php echo $recipes->r_name; ?>
							</a>	
						<?php endforeach; endif; ?>
				    </div>
				</div>
				<div style='margin-top:10px;'>
					<?php
						if(isset($widget_home)): foreach ($widget_home as $widget): 
							if ($widget->widget_place == 1)	echo $widget->widget_source;
						endforeach; endif; 
					?>
				</div>
				<!-- <div class="box-title">
					<h4>FIND RECIPES</h4>
				</div>
				<div class="box-input">
					<input class="find-recipes" name="find_serch" placeholder=" Recipes">
				</div>
				<div style='margin-top:10px;'>
					<?php if(isset($widget_home)): foreach ($widget_home as $widget): 
							if ($widget->widget_place == 1)	echo $widget->widget_source;
					endforeach; endif; ?>
				</div> -->
			</div>
		</div>
	</div>
</section>